package com.example.onlinemonitoring.Util;
import java.lang.*;
import com.sun.jna.Native;
import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.Union;
import com.sun.jna.Library;
import com.sun.jna.Memory;
import com.sun.jna.win32.StdCallLibrary;


//SDK接口说明
public class SPx8x100Mx2USB  {
   // SPx8x100Mx2USB INSTANCE = (SPx8x100Mx2USB) Native.loadLibrary(System.getProperty("user.dir")+"\\lib\\SPx8x100Mx2USB.dll",
   //         SPx8x100Mx2USB.class);
    //SPx8x100Mx2USB INSTANCE =  (SPx8x100Mx2USB) Native.loadLibrary("F:\\work2022826\\substation-on-line-monitoring\\lib\\SPx8x100Mx2USB.dll", SPx8x100Mx2USB.class);
     //System.load("F:\\work2022826\\substation-on-line-monitoring\\lib\\lib\\SPx8x100Mx2USB.dll");
    /***宏定义***/
    public int BUFFER_COUNT = 2097152;
    //常量
    public static final int MAX_NAMELEN = 16;	
    public static final int MAX_RIGHT = 32;	//
    public static final int NAME_LEN = 32;    //

   // unsigned int USBPort(unsigned short int *Device, unsigned char *Instruction, unsigned int *Parameter, unsigned char *Buffer, unsigned int *Lenth)
    //NativeLong  USBPort( int  pusiDevice, String pucInstruction,  Pointer   puiParameter,  Pointer  pucBuffer);
    //NativeLong  USBPort( int  pusiDevice, String pucInstruction,  Pointer   puiParameter, Pointer  pucBuffer,  int puiLength);
    public native int  USBPort(int  pusiDevice, String pucInstruction,  Pointer   puiParameter, Pointer  pucBuffer,  int puiLength);
    //public native boolean  USB_Init();
    //public native boolean  USB_Cleanup();
}